<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/9
 * Time: 10:27
 */

class dbtool
{
    private static $conn;
    public static function setconn($conn)
    {
        self::$conn = $conn;
    }
    public static function selectconn($sql){
        $result =  self::$conn->query($sql);
        $data = [];
        while(true) {
            $row = $result->fetch_assoc();
            if (empty($row)) {
                break;
            }
            $data[] = $row;
        }
        return $data;
    }
}